home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 24
/
Amiga Format AFCD24 (Feb 1998, Issue 108).iso
/
-in_the_mag-
/
emulation
/
-otherstuff-
/
cross64_003
/
expand.asm
< prev
next >
Wrap
Assembly Source File
|
1998-01-20
|
1KB
|
52 lines
****************************************************
;
; Example program for testing the Cross64 assembler
;
; Expanding screen borders vertcally.
; After expansion a sprite placed under the top or
; bottom screen border will be visible.
;
****************************************************
ORG $C000
* Initialize the interrupt.
START SEI
LDA #>IRQ ; interrupt vector
STA $FFFE
LDA #<IRQ
STA $FFFF
LDA #$7F ; disable IRQ interrupt
STA $DC0D
LDA #1 ; enable raster interrupt
STA $D01A
LDA #$F8 ; interrupt at $F8
STA $D012
LDA #$1B
STA $D011
LDA $DC0D
CLI
L001 JMP L001
* Expanding top & bottom borders.
* Interrupt at raster line $F8.
;IRQ STA REMA+1 ; store registers
; STX REMX+1 ; note that arithmetic operations are not implemented
; STY REMY+1 ; in Cross64 yet...
IRQ STA REMA ; store registers
STX REMX
STY REMY
LDA $D019 ; acknowledge the interrupt
STA $D019
LDA #$13 ; shrink screen vertically
STA $D011 ; (24 lines)
LDA #$FC ; wait for raster line $FC
L002 CMP $D012
BNE L002
LDA #$1B ; restore screen height
STA $D011 ; to normal (25 lines)
REMA LDA #0
REMX LDX #0
REMY LDY #0
RTI